﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Configuration;

namespace SEO.EmailSearch
{
    public partial class TestFrm : Form
    {
        delegate void SetTextCallback(string text);
        private Thread catchThread = null;
        public int iNum = 1;
        SEO.Utility.IniFile iniFileVersion = new Utility.IniFile(Application.StartupPath + "\\version.ini");
        SEO.Utility.IniFile iniFile = new Utility.IniFile(Application.StartupPath + "\\config.ini");
        SEO.BLL.ESEmailsBLL emailbll = new BLL.ESEmailsBLL();
        SEO.BLL.ESKeywordsBLL keywordbll = new BLL.ESKeywordsBLL();
        SEO.DAL.ESKeywordsDAL keyworddal = new DAL.ESKeywordsDAL();

        public TestFrm()
        {
            InitializeComponent();
        }


        /// <summary>
        /// 显示实时消息到showMsg
        /// </summary>
        /// <param name="strMessage">实时消息</param>
        private void SetText(string strMessage)
        {
            if (this.showMsg.InvokeRequired)
            {
                SetTextCallback d = new SetTextCallback(SetText);
                this.Invoke(d, new object[] { strMessage });
            }
            else
            {
                this.showMsg.Text = strMessage;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {

            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            string strUrl = "http://weibo.yunyun.com/Weibo.php?p=1&q=%E5%A4%96%E6%B1%87%20%E9%82%AE%E7%AE%B1";

            SEO.Utility.WebClient wc = new SEO.Utility.WebClient();
            wc.Encoding = System.Text.Encoding.GetEncoding("UTF-8");
            wc.OpenRead(strUrl);
            string strGetHtmlCode = wc.RespHtml;
        }
    }
}
